{*
 * This file is part of the Agora distribution. 
 * Detailed copyright and licensing information can be found
 * in the gpl-3.0.txt file which should be included in the distribution.
 * 
 * @version		$Id: 3.0.14 Olympus 2010-09-28 rammstein4o $
 * @copyright  2007 - 2010 jVitals
 * @license   GPLv3 Open Source
 * @link       http://jvitals.com
 * @since      File available since initial release
 *}
{script src='js/hide.js'}
{cycle values='roweven,rowodd' assign=vtbg}
{script_def}
{once}
{literal}

function agora_split(agora_split_url) {
	new Ajax(agora_split_url, {
			method: 'post',
			onFailure: function(){},
			onComplete: function(inResponse) {
				var box = SqueezeBox.initialize();
				box.assignOptions();
				box.setContent('string',inResponse);
			}
	}).request();
}
<!--
function agora_createAuthorSlider(post_id) {
	var status = {
		'false': 'open',
		'true': 'close'
	};
	var mySlide = new Fx.Slide('pp_'+post_id).hide();
	$('toggle'+post_id).addEvent('click', function(e) {
		e = new Event(e);
		$('pp_'+post_id).setStyle("display","block");
		mySlide.toggle();
		e.stop();
	});
}
agora_posts = new Array();
window.addEvent('domready',function(e) {
	for (i=0; i < agora_posts.length; i++) {
		agora_createAuthorSlider(agora_posts[i]);
	}
});
//-->
{/literal}
{/once}
{/script_def}
<div id="p{$post.id}" class="ag_blockpost{$vtbg}{if $post_num eq 1} firstpost{/if}">
	<!-- post header -->
	<div class="ag_rightend">
		<div class="ag_headerbar">
			<span class="ag_middle">
				<span class="ag_postnum">
					<a href="{url task=topic id=$topic.id p=$page}#p{$post.id}" class="permatip"><span>##PERMALINK##</span>#{$post_num}&nbsp;&nbsp;Permalink</a>&nbsp;&nbsp;&nbsp;
					<a href="{$self_url}#top" title="##Top##"><img src="{image src=icons/up.png}" alt="##Top##" /></a>
				</span>
				<span class="ag_postdate">
					<a href="{url task=topic id=$topic.id p=$page _=p`$post.id`}">{$post.posted|agora_date}</a>
				</span>
			</span>
		</div>
	</div>
	<!-- /post header -->
	<!-- post content -->
	<div>
		<div id="postrow_area_{$post.id}" class="ag_postrow {if $agora_config.o_userdata eq 0}ag_left_column{elseif $agora_config.o_userdata eq 1}ag_right_column{/if}">
			<div class="ag_postrow_container">

				<div class="ag_postrow_wrap">
					<div class="ag_postrow_col1">
						<!-- post text -->
						<div id="ag_postarea_{$post.id}" class="ag_postarea">
							<div id="fulltext{$post.id}">
								<h3 class="ag_posttitle">{if $post_num gt 1}Re: {/if}{$topic.subject}</h3>
								<div class="ag_postmsg">
									{$post.message}
									{if !empty($plugin_template) and $post_num eq 1}
										{$plugin_template}
									{/if}
									{if $post.edited}
									<div class="ag_postedited">
										<strong>##Edited by##:</strong> {if $agora_config.o_fullnames_enabled}{$post.user.edited_by_name|nomail|escape}{else}{$post.edited_by|nomail|escape}{/if}<br/>{$post.edited|agora_date}
									</div>
									{/if}

									<div id="ag_signature_{$post.id}" class="ag_signature">
										{if $agora_config.o_prof_sig eq '1' and $post.user.signature != ''}
										<div class="ag_postsignature">
											{$post.user.signature}
										</div>
										{/if}
									</div>
								</div>
							</div>
						</div>
						<!-- /post text -->
					</div>
				</div>

				<div class="ag_postrow_col2">
					<!-- user info  -->
					<div id="ag_avatararea_{$post.id}" class="ag_avatararea userimg">
						<dl>
							<dt class="ag_username">
								{if $post.poster}{if $agora_config.o_fullnames_enabled}{$post.user.name|nomail|escape}{else}{$post.poster|nomail|escape}{/if}{/if}
							</dt>
							{if $post.user.title or $post.user.is_guest or $post.user_group}
							<dd class="ag_usertitle">
								{if $post.user.title}
									{$post.user.title}
								{elseif $post.user.is_guest}
									##Guest##
								{else}
									{$post.user_group}
								{/if}
							</dd>
							{/if}
							{if $post.user.bannd}
							<dd class="ag_usertitle" style="color:red;">
								##BANNED_UPPER##
							</dd>
							{/if}
							{if $post.user.rank}
							<dd class="ag_userrank">
								{$post.user.rank}
							</dd>
							{/if}
							{if $post.user.has_aup}
							<dd class="ag_userrank">
								##AU_POINTS##: {$post.user.points}
							</dd>
							{/if}
							{if $post.user.rank_image}
							<dd class="ag_userrank">
								<img src="{image src=ranks/`$post.user.rank_image`}" alt="ranks" />
							</dd>
							{/if}

							<dd class="ag_postavatar">
								<a href="{url task=profile user_id=$post.poster_id}">
									<img src="{$post.user.avatar}" alt="useravatar" title="{if $post.poster}{if $agora_config.o_fullnames_enabled}{$post.user.name|nomail|escape}{else}{$post.poster|nomail|escape}{/if}{/if}" />
								</a>
							</dd>

							<dd class="ag_useractive">
								{if $post.user.online}
								<img src="{image src=online.gif}" alt="##Online##" />
								{else}
								<img src="{image src=offline.gif}" alt="##Offline##" />
								{/if}
							</dd>

							{if $agora_config.o_show_post_count && $post.user.num_posts}
							<dd class="ag_userpost_count">
								<span>{$post.user.num_posts}</span> ##Posts##
							</dd>
							{/if}
							
							{if $agora_config.o_show_user_info eq '1' &&
								(!empty($post.user.gender)
								|| ($post.user.hide_age == 0 && !empty($post.user.birthday) && $post.user.birthday != '0' && $post.user.birthday != 'Never')
								|| !empty($post.user.url)
								|| ($agora_config.o_pms_enabled && !$post.user.is_guest && !$agora_user.is_guest)
								)
							}
							<dd class="ag_userinfo">
								<script type="text/javascript">
								<!--
								agora_posts[agora_posts.length] = {$post.id};
								//-->
								</script>

								<a id="toggle{$post.id}" href="javascript:void(0);" title="##User Info##"><img src="{image src=icons/down.png}" alt="##User Info##" /></a>

								<div id="pp_{$post.id}" style="display: none; ">
									<div id="vertical_slide_{$post.id}" style="padding: 10px 0; text-align: center; ">
										{if empty($post.user.gender)}
										{elseif $post.user.gender eq 1}
											<img src="{image src=icons/male.png}" alt="##Gender male##" title="##Gender male##" />&nbsp;
										{else}
											<img src="{image src=icons/female.png}" alt="##Gender female##" title="##Gender female##" />&nbsp;
										{/if}
										{if $post.user.hide_age == 0 && !empty($post.user.birthday) && $post.user.birthday != '0' && $post.user.birthday != 'Never' }
											<img src="{image src=icons/b-day.png}" alt="##Birthday##" title="##Birthday##: {if !empty($post.user.birthday)}{$post.user.birthday}{else}##Unknown##{/if}" />&nbsp;
										{/if}
										{if !empty($post.user.url)}
											<a href="{$post.user.url}" target="_blank"><img src="{image src=icons/www.png}" alt="##Website##" title="##Website##" /></a>&nbsp;
										{/if}
										{if $agora_config.o_pms_enabled && !$post.user.is_guest && !$agora_user.is_guest}
											<a href="{url task=pms page=compose send_to=$post.user.id}"><img src="{image src=icons/pm.png}" alt="##PM##" title="##PM##" /></a>&nbsp;
										{/if}
										{* <a href="mailto:{$post.user.email}"><img src="{image src=icons/email.png}" alt="##E-mail##" title="##E-mail##" /></a> *}
									</div>
								</div>
							</dd>
							{/if}

							{if !empty($post.user.extra)}
							<dd class="ag_userpost_extra">
								{$post.user.extra}
							</dd>
							{/if}

						</dl>
					</div>
					<!-- /user info  -->
				</div>
			</div>
		</div>

		<!-- post edit  -->
		<div id="ag_post_tools_{$post.id}" class="ag_post_tools">
			{if $access.post_reply or $access.post_report or $access.post_delete or $access.post_edit}
			<div class="ag_post_buttons">
				{if $agora_config.o_quickpost}
				{if $access.post_reply and not $topic.closed}
				<span class="ag_bttn ag_bttn_r">
					<a onmouseover="copyQ('{if $agora_config.o_fullnames_enabled}{$post.user.name|nomail|escape}{else}{$post.user.username|nomail|escape}{/if}');" href="javascript:pasteQ();" title="##Quote selected text##">
						##Quote selected text##
					</a>
				</span>
				{/if}
				{if $access.post_reply and not $topic.closed}
				<span class="ag_bttn ag_bttn_r">
					<a onclick="javascript:pasteN('{if $agora_config.o_fullnames_enabled}{$post.user.name|nomail|escape}{else}{$post.user.username|nomail|escape}{/if}'); return false;" href="javascript:void(0)" title="##Paste Username##">
						##Paste Username##
					</a>
				</span>
				{/if}
				{/if}

				{if $access.post_report}
				<span class="ag_bttn ag_bttn_r" title="##Report##">
					<a href="{url task=post action=report id=$post.id}">
						##Report##
					</a>
				</span>
				{/if}

				{if $access.post_reply and not $topic.closed}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=reply id=$topic.id}" title="##Post reply##">
						<img src="{image src=post_add.png}" alt="##Post reply##" /> ##Post reply##
					</a>
				</span>
				{/if}

				{if $access.post_reply and not $topic.closed}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=reply action=quote id=$post.id}" title="##Quote##">
						<img src="{image src=post_add.png}" alt="##Quote##" /> ##Quote##
					</a>
				</span>
				{/if}

				{if $access.edit_posts and $post_num !== 1 and $agora_user.id == $post.poster_id }
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=edit id=$post.id}" title="##Edit##">
						<img src="{image src=post_edit.png}" alt="##Edit##" /> ##Edit##</a>
				</span>
				{elseif $access.edit_posts and $post_num !== 1 and ($agora_user.is_superadmin == 1 or $access.can_moderate) }
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=edit id=$post.id}" title="##Edit##">
						<img src="{image src=post_edit.png}" alt="##Edit##" /> ##Edit##</a>
				</span>
				{elseif $access.edit_topic and $post_num == 1 and $agora_user.id == $post.poster_id }
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=edit_topic id=$topic.id post_id=$post.id}" title="##Edit##">
						<img src="{image src=post_edit.png}" alt="##Edit##" /> ##Edit##</a>
				</span>
				{elseif $access.edit_topic and $post_num == 1 and ($agora_user.is_superadmin == 1 or $access.can_moderate) }
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=edit_topic id=$topic.id post_id=$post.id}" title="##Edit##">
						<img src="{image src=post_edit.png}" alt="##Edit##" /> ##Edit##</a>
				</span>
				{/if}

				{if $access.delete_posts and $post_num !== 1 and $agora_user.id == $post.poster_id}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=delete id=$post.id}" title="##Delete##">
						<img src="{image src=post_delete.png}" alt="##Delete##" /> ##Delete##</a>
				</span>
				{elseif $access.delete_posts and $post_num !== 1 and ($agora_user.is_superadmin == 1 or $access.can_moderate)}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=delete id=$post.id}" title="##Delete##">
						<img src="{image src=post_delete.png}" alt="##Delete##" /> ##Delete##</a>
				</span>
				{elseif $access.delete_topics and $post_num == 1 and $agora_user.id == $post.poster_id}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=delete_topic id=$topic.id}" title="##Delete##">
						<img src="{image src=post_delete.png}" alt="##Delete##" /> ##Delete##</a>
				</span>
				{elseif $access.delete_topics and $post_num == 1 and ($agora_user.is_superadmin == 1 or $access.can_moderate)}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=post page=delete_topic id=$topic.id}" title="##Delete##">
						<img src="{image src=post_delete.png}" alt="##Delete##" /> ##Delete##</a>
				</span>
				{/if}
				{if !empty($addto_article) and $post_num == 1 and ($agora_user.is_superadmin == 1 or $access.can_moderate)}
				<span class="ag_bttn ag_bttn_r">
					<a href="{url task=topic action=addtoarticle id=$topic.id}" title="##Make as new article##">##Make as new article##</a>
				</span>
				{/if}
				{if $access.close_topic and $post_num !== 1}
				<span class="ag_bttn ag_bttn_r">
					<a href="#" onclick="agora_split('{url task=topic action=split topic_id=$topic.id post_id=$post.id format=raw}');return false;" title="##Split##">
						<img src="{image src=post_split.png}" alt="##Split##" /> ##Split##</a>
				</span>
				{/if}
			</div>
			{elseif $user_banned}
			<strong>##BAN_MESSAGE_PROFILE##</strong>
			{else}
			<strong>##Administrator has disabled public posting##</strong>
			{/if}
		</div>
		<!-- /post edit  -->
	</div>
	<!-- /post content -->
</div>
<div class="ag_post_separator"></div>

{if $post_num_on_page eq 1}
<div class="ag_adsense">
	{loadModule name=agora_ban}
</div>
<div class="ag_post_separator"></div>
{/if}